<!DOCTYPE html>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <title>文件上传配置 - 后台管理系统模板</title>
    <link rel="icon" href="favicon.ico" type="image/ico">
    <meta name="keywords" content="菜单管理">
    <meta name="description" content="菜单管理页">
    <meta name="author" content="yinqi">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">

    <link href="/common/libs/materialdesignicons/materialdesignicons.min.css" rel="stylesheet" type="text/css" >
    <link href="/common/libs/fontawesome-free-5.11.2-web/css/all.min.css" rel="stylesheet" type="text/css" >
    <link href="/common/libs/bootstrap5.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" >
</head>
<body>
<div class="container-fluid">
    <h5><span class="badge bg-primary mt-3">设置文件存储方式</span></h5>
    <div class="row mt-6">
        <div class="col-6">
            <div class="mb-3 row">
                <label for="staticEmail" class="col-sm-2 col-form-label">存储方式：</label>
                <div class="col-sm-10">
                    <select class="form-select form-select-lg mb-3" id="storageMethodValue" aria-label=".form-select-lg 示例">
                        <option selected>请选择文件存储方式</option>
                        <option value="1">本地存储</option>
                        <option value="2">阿里云OSS</option>
                    </select>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-6">
            <div class="mb-3 row">
                <label for="inputPassword" class="col-sm-2 col-form-label">KeyId：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputKeyId">
                </div>
            </div>
            <div class="mb-3 row">
                <label for="inputPassword" class="col-sm-2 col-form-label">KeySecret：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputKeySecret">
                </div>
            </div>
            <div class="mb-3 row">
                <label for="inputPassword" class="col-sm-2 col-form-label">End_Point：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputEnd_Point">
                </div>
            </div>
            <div class="mb-3 row">
                <label for="inputPassword" class="col-sm-2 col-form-label">Bucket_Name：</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="inputBucket_Name">
                </div>
            </div>
            <div class="mb-3 row">
                <label for="inputPassword" class="col-sm-2 col-form-label">阿里云OSS官网：</label>
                <div class="col-sm-10">
                    <a href="https://www.aliyun.com/" target="_blank">https://www.aliyun.com/</a>
                </div>
            </div>
        </div>
    </div>
</div>



<script src="/common/libs/jquery/jquery-3.7.1.min.js" type="text/javascript" ></script>
<script src="/common/libs/bootstrap5.3.2/js/bootstrap.min.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function (){
    $.get("/system/config/upload/getYunOSSById", {"aLiYunOSSId": 1}, function (r) {
        if (r.code === 200) {
            var aLiYunOSS = r.msg;
            document.getElementById('inputKeyId').value = aLiYunOSS.keyId;
            document.getElementById('inputKeySecret').value = aLiYunOSS.keySecret;
            document.getElementById('inputEnd_Point').value = aLiYunOSS.endPoint;
            document.getElementById('inputBucket_Name').value = aLiYunOSS.bucketName;
        } else {
            $Jtk.n_danger(r.msg);
        }
    });
});
</script>
</body>
</html>